import React from 'react';
import './App.css';
import { HashRouter  as Router, Route } from "react-router-dom";
import router from './route/index'
import {getUrlParam} from './utils/tools'
import vconsole  from 'vconsole'
// new vconsole()
function App() {
  let jwt = getUrlParam('jwt')
  if(jwt){
    localStorage.setItem('jwt',jwt)
  }
  
  return (
    <Router>
      {router.map((item, idx) => {
        return (
          <Route
            key={idx}
            path={item.path}
            exact
            component={item.component}
          />
        )
      })}
    </Router>
  );
}

export default App;
